home *** CD-ROM | disk | FTP | other *** search
- Path: news.texas.net!usenet
- From: Michael Douglass <mikedoug@texas.net>
- Newsgroups: comp.lang.c
- Subject: Re: simple code, argc, argv, strcmp()
- Date: Tue, 06 Feb 1996 10:02:14 -0600
- Organization: Texas Networking, Inc.
- Message-ID: <31177B86.41C67EA6@texas.net>
- References: <11f7cc$17261a.3b3@daprez> <9602011151.AA04526@dxmint.cern.ch>
- NNTP-Posting-Host: millenium.texas.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.4 sun4m)
-
- Dan Pop wrote:
-
- > So:
- >
- > 1. Never use ! with strcmp. It's a good way to shoot yourself in the foot.
-
- Hmmm... I've *never* had any problems with do that... Could you please
- clarify why it would cause you to shoot yourself in the foot?
-
- > 2. Always check what a function is supposed to return before using it.
- > strcmp returns 0 when the strings are equal.
-
- I think he knew that, he just had hist || and && logic backwards.
-
- --
- Michael Douglass
- "I didn't change a thing and from the moment I didn't change it,
- it doesn't work anymore." -- Anonymous
-